package cn.ztuo.bitrade.entity;

import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @Description  
 * @Author  Hunter
 * @Date 2020-03-16 
 */

@Data
@Entity
@Table ( name ="contract_coin" )
public class ContractCoin  implements Serializable {

	private static final long serialVersionUID =  3076235225035293586L;

	/**
	 * ID
	 */
	@Id
   	@Column(name = "id" )
	private Integer id;

	/**
	 * 合约名称
	 */
   	@Column(name = "symbol" )
	private String symbol;

	/**
	 * 基础货币  BTC
	 */
   	@Column(name = "base_symbol" )
	private String baseSymbol;


	/**
	 * 计价货币的利率
	 */
   	@Column(name = "base_symbol_scale" )
	private BigDecimal baseSymbolScale;

	/**
	 * 计价货币  USDT
	 */
   	@Column(name = "coin_symbol" )
	private String coinSymbol;

	/**
	 * 基础货币的利率
	 */
   	@Column(name = "coin_symbol_scale" )
	private BigDecimal coinSymbolScale;

	/**
	 * 提取流动性费率
	 */
   	@Column(name = "mention_fee" )
	private BigDecimal mentionFee;

	/**
	 * 提供流动性费率
	 */
   	@Column(name = "provide_fee" )
	private BigDecimal provideFee;

	/**
	 * 最小挂单量
	 */
   	@Column(name = "min_volume" )
	private BigDecimal minVolume;

	/**
	 * 最大挂单量
	 */
   	@Column(name = "max_volume" )
	private BigDecimal maxVolume;

	/**
	 * 最大允许同时交易的订单数，0表示不限制
	 */
   	@Column(name = "max_trading_order" )
	private Integer maxTradingOrder;

	/**
	 * 排序
	 */
   	@Column(name = "sort" )
	private Integer sort;
	/**
	 * 机器人状态
	 */
   	@Column(name = "robot_status" )
	private Integer robotStatus = 0;
	/**
	 * 排序
	 */
   	@Column(name = "fee_rate" )
	private BigDecimal feeRate = BigDecimal.ZERO;

	/**
	 * 1=启用0=停用
	 */
   	@Column(name = "enable" )
	private Integer enable = 1;
	/**
	 * 1=启用0=停用
	 */
   	@Column(name = "user_rate_status" )
	private Integer userRateStatus = 0;
	/**
	 * 1=启用0=停用
	 */
   	@Column(name = "stop_loss_rate" )
	private BigDecimal stopLossRate;
	/**
	 * 1=启用0=停用
	 */
   	@Column(name = "stop_gain_rate" )
	private BigDecimal stopGainRate;
	//数量精度
	@Transient
	private int coinScale = 4;
	//价格精度
	@Transient
	private int baseCoinScale =4;
	//价格精度
	@Transient
	private BigDecimal indexPrice;
}
